package com.simplefan.framework.server.jta;

import com.simplefan.framework.common.api.jta.XXAResource;
import com.simplefan.framework.common.exception.TransactionException;

import java.rmi.RemoteException;

/**
 * <pre>
 * File name : AbstractXXAResource.java
 * Created on : 2007-12-7 14:37:00
 * Description : TODO
 * @author Jonathan Wong
 * </pre>
 */
public abstract class AbstractXXAResource implements XXAResource {

    private String jndiName;
    
    private int timeout;

    public int getTimeout() {
        return timeout;
    }

    public boolean setTransactionTimeout(int seconds) throws TransactionException, RemoteException {
        this.timeout = seconds;
        return true;
    }

    public String getJndiName() {
        return jndiName;
    }

    public void setJndiName(String jndiName) {
        this.jndiName = jndiName;
    }
}

